package com.example.springboot.pojo;


import com.fasterxml.jackson.annotation.JsonIgnore;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.time.LocalDateTime;
@Data
public class User {
    @NotNull
    private Integer id;
    private String username;
    private String password;

    @NotEmpty
    @Pattern(regexp = "^\\S{1,10}$")
    private String nickname;//昵称

    @NotEmpty
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式不正确")
    private String userphone;

    //身份证号
    @NotEmpty
    private String idCard;
    //头像
    private String userphoto;
    //性别
    private String sex;

    private String useraddress;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;

    @NotEmpty
    private String role;
}
